package business_logic.view;

import fiuba.algo3.titiritero.modelo.SuperficieDeDibujo;

public class PauseMessage extends TextView
{

    private boolean m_enabled;

    public PauseMessage()
    {
        super("PAUSA");
        m_enabled = false;
        this.center();
    }
    
    public void setEnabled( boolean enabled )
    {
        m_enabled = enabled;
    }
    
    @Override
    public void dibujar(SuperficieDeDibujo graphicSurface)
    {
        
        if ( m_enabled )
        {
            
            super.dibujar(graphicSurface);

            //(note: above code is covered by the MIT License as noted on the page.)
            
            /*
            Graphics2D g2 = (Graphics2D)(((SuperficiePanel)graphicSurface).getBuffer());
            
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                RenderingHints.VALUE_ANTIALIAS_ON);
            Font font = new Font(Font.SANS_SERIF, Font.BOLD, 96);
            g2.setFont(font);
            g2.setColor(Color.WHITE);

            int y_position  = ((SuperficiePanel)graphicSurface).getWidth()/2-80;
            int x_position = ((SuperficiePanel)graphicSurface).getHeight()/2-95;

            g2.drawString("PAUSA", x_position, y_position);
            /**/
        }
    }

}
